package com.xdh.springcloud.security.jwt.common.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class JwtConfig {

    @Value("${security.jwt.tokenExpirationSeconds:300}")
    private long tokenExpirationSeconds;

    @Value("${security.jwt.tokenNextRefreshSeconds:240}")
    private int tokenNextRefreshSeconds;

    @Value("${security.jwt.tokenSecretKeyBytes:-16, -87, 27, -110, 79, -94, 59, -59, -127, -13, -25, -78, 65, -100, 10, 6, 96, -36, -94, 82, 53, 34, -96, -71, 43, -10, 48, 87, 42, -56, -14, -103, -96, -101, 26, -100, -2, 79, 36, -91, 14, 16, -20, -75, -109, -106, 54, 41, -29, 51, 55, -98, 74, -64, 28, -55, 50, -110, -111, 39, -46, -100, 13, 2}")
    private byte[] jwtSecretKeyBytes;

    public long getTokenExpirationSeconds() {
        return tokenExpirationSeconds;
    }

    public void setTokenExpirationSeconds(long tokenExpirationSeconds) {
        this.tokenExpirationSeconds = tokenExpirationSeconds;
    }

    public byte[] getJwtSecretKeyBytes() {
        return jwtSecretKeyBytes;
    }

    public void setJwtSecretKeyBytes(byte[] jwtSecretKeyBytes) {
        this.jwtSecretKeyBytes = jwtSecretKeyBytes;
    }

    public int getTokenNextRefreshSeconds() {
        return tokenNextRefreshSeconds;
    }

    public void setTokenNextRefreshSeconds(int tokenNextRefreshSeconds) {
        this.tokenNextRefreshSeconds = tokenNextRefreshSeconds;
    }
}
